package com.example.studentstatusmanagement.service;

import com.example.studentstatusmanagement.mapper.PlotMapper;
import com.example.studentstatusmanagement.pojo.Plot;
import com.example.studentstatusmanagement.pojo.PlotExample;
import com.example.studentstatusmanagement.pojo.doo.ReqRoom;
import com.example.studentstatusmanagement.pojo.dto.SRoom;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class PlotServiceImpl  implements PlotService{

    @Resource
    private PlotMapper plotMapper;
    @Override
    public List<ReqRoom> selectBuildingsForPlot() {
        return plotMapper.selectBuildingsForPlot();
    }

    @Override
    public List<SRoom> selectPlots(ReqRoom reqRoom) {
        return plotMapper.selectPlots(reqRoom);
    }

    @Override
    public int updateByPrimaryKeySelective(Plot record) {
        return plotMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public List<Plot> selectByExample(PlotExample example) {
        return plotMapper.selectByExample(example);
    }

    @Override
    public int insertSelective(Plot record) {
        return plotMapper.insertSelective(record);
    }

    @Override
    public Plot selectByPrimaryKey(Integer id) {
        return plotMapper.selectByPrimaryKey(id);
    }
}
